package other_其他模式.composite_entity_pattern_组合实体模式;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hihi
 * @Date: 2020/07/10/10:49
 * @Description: 粗粒度的对象
 */
public class CoarseGrainedObject {

	DependentObject1 dependentObject1 = new DependentObject1();
	DependentObject2 dependentObject2 = new DependentObject2();

	public void setData(String data1, String data2) {
		dependentObject1.setData(data1);
		dependentObject2.setData(data2);
	}

	public String[] getData() {
		return new String[] { dependentObject1.getData(), dependentObject2.getData() };
	}
}
